package com.ExaminStudy;

import java.util.Random;

public class Test5_2 {
    public static void main(String[] args) {
        Random r=new Random();
        int[]arr=new int[10];
        int max=arr[0];
        int temp;
        for (int i = 0; i <10 ; i++) {
            arr[i]=r.nextInt(101);

        }
        for (int i = 0; i <10 ; i++) {
            for (int j =i+1; j <10 ; j++) {
                if(arr[i]<arr[j]){
                    temp=arr[i];
                    arr[i]=arr[j];
                    arr[j]=temp;
                }

            }

        }
        for (int i = 0; i <10 ; i++) {
            System.out.println(arr[i]);
        }
    }
}
